Skip to content

Change default inventory key to E, default Aux1 key to F #16053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

minlemon
Copy link
Contributor

To do

This PR is Ready for Review.

  • Check there are no other places the default keybinding for inventory, Aux1 is specified
  • After merging: update docs page /for-players/controls/

How to test

Launch a new game that uses inventory and Aux1 (e.g. VoxeLibre). Press E for inventory. Hold F to run.

@y5nw y5nw added the UI/UX label Apr 21, 2025
@Zughy Zughy added Feature ✨ PRs that add or enhance a feature Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand labels Apr 21, 2025
@sfan5 sfan5 self-requested a review April 22, 2025 08:18
@lhofhansl
Copy link
Contributor

IMHO... why change the default? If folks want to change it, they have the option.

@minlemon
Copy link
Contributor Author

IMHO... why change the default? If folks want to change it, they have the option.

Please review the discussion in #16052. The short answer is that the default inventory key of "I" cannot be pressed without looking down at the keyboard and Luanti should come with solid defaults. As a case study Minecraft started with inventory key being "I" but switched to "E" after user feedback.

@sfan5 sfan5 added this to the 5.12.0 milestone Apr 26, 2025
@sfan5
Copy link
Collaborator

sfan5 commented Apr 26, 2025

Adding to milestone, because I think we should decide this before release.

Copy link
Collaborator

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works. I support this.

@sfan5 sfan5 added One approval ✅ ◻️ and removed Roadmap: Needs approval The change is not part of the current roadmap and needs to be approved by coredevs beforehand labels May 2, 2025
@Zughy
Copy link
Contributor

Zughy commented May 2, 2025

👎

I'm the owner of a mini-game server, featuring 10 different mini-games. Here are some stats:

  • only 1 mini-game out of 10 features and uses the inventory (skywars). Pressing "I" outside skywars won't even show an inventory
  • 3 mini-games out of 10 + the lobby use AUX1 for specific actions. These being:
    • Block League - renders the scoreboard whilst held down
    • Fantasy Brawl - same as above
    • Sumo - sprints
    • Lobby - displays all the people online and some info about them (ping, role, what they're playing) whilst held down
  • the aforementioned mini-games display graphics telling you what key does what
  • Block League is the most played mini-game (last 30 days)
    image
  • it's one of the most played servers out there

Given these points, changing the key is a breaking change for us: although it'll result in a better UX for skywars (faster inventory access), it'll worsen the UX of the rest (PC players got used for years to press E, starting from myself), also forcing us to update the graphics that display controls. And to be clear: we don't care that much about skywars compared to our original mini-games, it's only there as a soft landing for people coming from Minecraft.

We're already using sub-optimal keys, as all I need to get confused and hit the wrong key is to play some FPS to then come back to Block League (an FPS on Luanti), where the reloading key isn't R but Q (drop key) because of LT limitations. What I'd like to see, on the contrary, is the possibility for modders to be able to map whatever key they need for their games. I don't want the scoreboard on E, but I don't even want it on F, having to rewire my brain after 4 years of pressing E. I'd want it where every game puts it, so as to create a continuum between my game and the others: on TAB. That would fix my problem. This, on the contrary, is only another layer of annoyance.

Considering the embarassing bikeshedding on retrocompatibility other people and I had to face in the past, even when it made little to no sense, seeing core devs now happy to change a key because a lot of games will benefit from it even if some others will experience a drawback is frankly ridiculous. Is my game less important than others? Where's the retrocompatibility now? Would you code the required changes for me? Display different graphics according to the client version, let alone the fact that I now need to get used to F?

To be clear: I'm super happy if people playing games featuring inventories can have a better UX, but I expect this to happen without worsening the experience of other games not caring about inventories. I think this should come alongside the possibility for modders to associate whatever key to whatever action. As it is, as a modder of something that doesn't want to be like Minecraft, I oppose it.

@minlemon
Copy link
Contributor Author

minlemon commented May 2, 2025

@Zughy I understand the sentiment, just remember that existing players would not have to "rewire their brains" since their existing local controls settings won't change. This is primarily targeted to new players and a general best-by-default UX improvement which should make Luanti in general more attractive and prevent early frustration in playing using the engine (like my friend and I experienced). You mention that you have a game as a soft landing from people coming from Minecraft - we should ensure those new players continue to come.

I completely agree that there should be per-game controls and mod-suggested keyboard defaults. You can view this PR as a stepping stone toward greater acceptance of similar changes. Once I implement encryption over Luanti's networking stack I would be happy to help you work on a per-game controls feature. I don't want to get this PR held up however because I very strongly feel it is necessary from a new player perspective.

@Zughy
Copy link
Contributor

Zughy commented May 2, 2025

just remember that existing players would not have to "rewire their brains" since their existing local controls settings won't change

Right now modders have no way to get the key associated to the action. Meaning that if there is a HUD telling that Action A = AUX1, the default might be E or F according to the client version (and you'll either write E or F, "AUX1" doesn't make sense to the average player). So if our HUDs are already broken for mobile users and people with custom keybinding, now they'll always be broken even for PC players depending on LT version because we had to pick whether to stick to E or F. Unless, which is more coding, we display two different texts by checking the version. It'd be fine if this were going in the right direction, but it's not: when/if all the keys become available like in a real engine, we'll need to change the code again (hardcoded AUX1 (E, F) or TAB). No, thanks.

Once I implement encryption over Luanti's networking stack I would be happy to help you work on a per-game controls feature

Then let's plan this for 5.13, in 3 months, alongside what I've requested*, so games like mine don't have to be punished for the "greater good". Air quotes because I'd like to remind that my server was the only one being featured twice in a row at FOSDEM at the Luanti booth, so again, we're not talking about a niche game with a couple of users per day. I expect Luanti not to complicate the life of those games that actually make it more popular, especially if those games did nothing wrong. Moreover, last time I checked we wanted to be as much detached as possible from being a Minecraft clone, yet this move only makes life easier for Minecraft clones, potentially worsening it for games that are not interested in being one.

*It's obvious that in order to do that, we need to have a clear direction and not just merge whatever we want. But this is a horse of a different colour

@sfan5

This comment was marked as resolved.

@NathanSalapat
Copy link
Contributor

I agree with Zughy, this change will make any existing tutorials/videos confusing to new users as they will have the old inventory/Aux 1 key being used. If new players are having such trouble finding the inventory key it sounds like we should do a better job exposing the keys to new users, and letting them know that they can change them to whatever they'd like.

@minlemon
Copy link
Contributor Author

minlemon commented May 2, 2025

@NathanSalapat This is not an issue with finding the inventory key. The point of the PR is that the I key is not a very good default for inventory. It is not reachable with your left hand while playing a game, forcing you to look down at the keyboard in order to press it - in fact, you should not have to "find" the key at all. Instead it should be in an ergonomic location so you don't have to take your eyes from the screen, like the E key. This is what Minecraft players discovered 14 years ago. As for existing tutorials/videos, those will age and be replaced regardless as Luanti continues to change and be developed further; if Luanti doesn't change much in the future, then the earlier we make this change, the better in that respect.

I kind of expected some resistance: Minecraft forums had some people who still preferred the I key shortly after the change to E in 2011. But just a year later there was a second discussion about key defaults and it appears that virtually nobody was changing it back to I because it simply makes sense design-wise to put a frequently used key next to the WASD keys in a WASD game and not on the other side of the keyboard.

@Zughy
Copy link
Contributor

Zughy commented May 2, 2025

Minecraft forums had some people who still preferred the I key shortly after the change to E in 2011. But just a year later there was a second discussion about key defaults and it appears that virtually nobody was changing it back to I

That makes totally sense, back then I was playing Minecraft using E as well. The issue here is that Minecraft was and still is a game. Here, on the contrary, we're talking about a gaming platform, which is different. We can't just ignore some games to benefit others

@sfan5
Copy link
Collaborator

sfan5 commented May 3, 2025

First I want to clarify one point:

just remember that existing players would not have to "rewire their brains" since their existing local controls settings won't change.

Changing the default will change it for everyone, except if they have explicitly set these keys in their config (e.g. by changing them at least once in the controls menu).
Keeping the old keys for all existing players is possible, but would have to be implemented as extra compatibility code.


it'll worsen the UX of the rest (PC players got used for years to press E, starting from myself)

This is true but largely unavoidable. If we think that I really is a bad place to put an often used key, that's more reason to do it soon as possible.
And obviously people can still customize their key bindings.

In the same breath as the dialog for #16049 we can even inform players that the keys have changed, provide convenient options
to keep the old layout, and more.

also forcing us to update the graphics that display controls

Keeping the default key bindings the same forever was never realistic, and you were relying on the peculiarity of Luanti using character-based keybindings instead of scancodes.
As of #14964 this has changed so that key that triggers AUX1 may or may not have E written on it.

In fact all QWERTZ users now need to press a totally different key to zoom. I do not see the same opposition to that change.
(Since we have some breaking key changes in 5.12 anyway this is why I suggested to consider this PR too.)

What I'd like to see, on the contrary, is the possibility for modders to be able to map whatever key they need for their games.

I agree. However, this is not what this PR is about.
Changing the default keys now does not impede having fully flexible key bindings in the future. It does not consume developer time that could have been spent on developing such a system.

If it was realistic to have flexible keys ready for 5.13 I could be convinced to hold off of this change, but we know this isn't the case.

seeing core devs now happy to change a key because a lot of games will benefit from it even if some others will experience a drawback is frankly ridiculous

Can you elaborate on why this is a drawback for certain games?
I can see you arguing why changing the key at all is harmful, but is there a game where the inventory is better left on I?

The whole premise of this PR is that I is an inconvenient placement for a common key, not that "Minecraft has the inventory on I so we should too".

Display different graphics according to the client version, [...]?

Don't you have this anyway to account for mobile players?

While it won't work with in-game graphics the proper solution to this is an escape sequence like hecks proposed some day that dynamically expands to whatever key AUX1 is bound to on each client.

@y5nw
Copy link
Contributor

y5nw commented May 3, 2025

just remember that existing players would not have to "rewire their brains" since their existing local controls settings won't change.

Changing the default will change it for everyone, except if they have explicitly set these keys in their config (e.g. by changing them at least once in the controls menu). Keeping the old keys for all existing players is possible, but would have to be implemented as extra compatibility code.

In addition to this, the old keybinding menu (before #15791; i.e., 5.11 and earlier ...) only saved keybindings that were different from the default value, and binding a key to its default clears the setting:

for (key_setting *k : key_settings) {
std::string default_key;
Settings::getLayer(SL_DEFAULTS)->getNoEx(k->setting_name, default_key);
if (k->key.sym() != default_key)
g_settings->set(k->setting_name, k->key.sym());
else
g_settings->remove(k->setting_name);
}

While it won't work with in-game graphics the proper solution to this is an inline-formatting like hecks proposed some day that dynamically expands to whatever key AUX1 is bound to on each client.

Related: #14788. Although I would instead prefer introducing an escape sequence that gets expanded client-side.

Also: graphical buttons are hard to get right while also allowing styling.


I can imagine that we merge this after addressing #14788, but given that said feature will not be implemented in the current release cycle I am not sure whether it is a good idea to break keybinding defaults in two consecutive releases instead of merging this PR into 5.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default inventory key "I" should be changed to something more natural
7 participants